function validateLoginMes() {
	var name = document.getElementsByName("name")[0].value;
	var password = document.getElementsByName("password")[0].value;
	alert(name);
	alert(password);

	if (name != null && password != null) {
		if (name.length >= 4 && password.length >= 4) {
			return 0;
		} else {
			return 1;
		}
	}	
	
	return 2;
}

function submitEditLoginMes() {
	var result = validateLoginMes();
	if (result == 0) {
		document.forms("editLoginForm").submit();
	} else if(result == 1) {
		window.alert("登录用户名或密码过于简单，请更换！");
		return;
	} else  if (result == 2) {
		window.alert("信息不完整，请完善！");
		return;
	}
}